<?php
/**
 * AmountHelper.php class file.
 * @author wudg <544038230@qq.com>
 * @date 2020/10/27- 5:47 下午
 */

namespace common\helpers;


class AmountHelper
{



    public static function fenToYuan(int $amount)
    {
        return sprintf('%.2f',$amount/100);
    }

    /**
     * 整型
     * @param $amount
     * @return float|int
     */
    public static function yuanTofen($amount)
    {
        return (int)($amount*100);
    }



}